{% extends 'base.html' %}
{% load cache %}
{% load i18n %}
{% block title %}{% block subtitle %}{% endblock %} - GAE bbs{% endblock %}

{% block nav %}
    <li><a href="{% url app1.views.index %}" title="CMS">CMS</a></li>
    <li class="curselect"><a href="{% url app2.views.index %}" title="{% trans 'BBS' %}">{% trans 'BBS' %}</a></li>
{% endblock %}

{% block content %}
<div id="yui-main">
    {% block content_main %}{% endblock %}
</div>

<div class="yui-b" id="sidebar">
<form action="http://www.google.com/cse" target="_blank" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="{% if g_blog.google_cse_cx %}{{g_blog.google_cse_cx|safe}}{% else %}009677936332633277893:-nyho-cdiwa{% endif %}" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="28" />
    <input type="submit" name="sa" value="{% trans 'Go' %}" />
  </div>
</form>

{% if user.is_authenticated %}
<div class="wrap_top">
<h2>{% trans "Administration" %}</h2>
<ul class="wrap_list">
<li><a href="{% url app2.views.myarticles %}">{% trans "My articles" %}</a></li>
{% if user.is_superuser %}
<li><a href="/admin/app2/">{% trans "Django administration" %}</a></li>
{%endif%}
</ul>
</div>
{%endif%}

<div class="wrap_top">
<h2>{% trans "Category List" %}</h2>
<ul class="wrap_list">
{%for each in all_categories%}
<li><a href="{{each.get_absolute_url}}" title="{{each.name|safe}}">{{each.name|safe}}</a></li>{%endfor%}
</ul>
</div>

{%if links_list%}
<div class="wrap_top">
<h2>{% trans "Links" %}</h2>
<ul class="wrap_list">
{%for each in links_list%}
<li class="link"><a href="{{each.url}}" title="{{each.name}}" target="_blank">{{each.name}}</a></li>{%endfor%}
</ul>
</div>
{%endif%}

</div>

{% endblock %}
